package com.yh.services.impl;

import com.yh.dao.IUsersMapper;
import com.yh.entity.Users;
import com.yh.services.IUsersService;
import com.yh.util.SqlSessionFactoryUtil;
import org.apache.ibatis.session.SqlSession;

import java.util.List;

public class UsersServiceImpl implements IUsersService {
    SqlSession session = SqlSessionFactoryUtil.getSqlsession();
    IUsersMapper mapper = session.getMapper(IUsersMapper.class);

    @Override
    public int usersReg(Users users) {
        int b = mapper.usersReg(users);
        session.commit();
        return b;
    }

    @Override
    public Users usersLog(Users users) {
        return mapper.usersLog(users);
    }
}
